package com.my.screenadapter.lifecircle;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.my.screenadapter.R;

/**
 * 用于演示Crash后生命周期
 * create
 * onstart
 * onresume
 * crash----
 * 结束 没有其他周期了
 * Created by 张英杰 on 2017/6/27.
 */

public class CrashActiviyLifeDemo extends AppCompatActivity {
    private static final String TAG = "CrashActiviyLifeDemo";
    TextView tv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i(TAG, "onCreate: ");
        setContentView(R.layout.activity_crash_life);
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.i(TAG, "onStart: ");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.i(TAG, "onResume: ");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.i(TAG, "onPause: ");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.i(TAG, "onDestroy: ");
    }

    public void startCrash(View v) {
        Log.i(TAG, "startCrash: 111");
        tv.setText("");
        Log.i(TAG, "startCrash: 222");
    }

}
